I'm writing a script in PowerShell that can allows me to login into this page and download a file.
The login is done, but I now have a new problem: the .zip file I want to download doesn't have a plain text URL but instead is generated by JavaScript. If I inspect the element this is what I see:
<a ng-if="config.fileType.fileType != 'DOCUMENT'" href="javascript:;" data-ng-click="checkForFileAndDownload(getVersionForCurrentLanguage(file.versions))" class="ng-binding ng-scope">post_adressdaten 2021-09-07</a> == $0
That link doesn't has a Tag or an ID therefore I cannot click on it.
Even if I click on it then the browser will ask to save and I don't know how to proceed.
You can create an account and login to that page if you want to inspect by yourself.
Any help will be much appreciated.
The workaround was to search in the page for the text and click on it:
$link = $ie.Document.getElementsByTagName('A') | where-object {$_.innerText -like 'post_adressdaten*'}
$link.click()
This the whole